<!--
 * @Author: 刘霁雯
 * @Description: 浏览历史
 -->
<template>
    <div>
        <cli-title-customer></cli-title-customer>
        <div class="productList">
            <h1 style="margin-left: 30%;margin-top: 15%" v-if="proList.length===0">快去看看有什么喜欢的吧 (◕‿◕✿)</h1>
            <product-list :list="list" :pro-list="this.proList"></product-list>
        </div>
    </div>
</template>

<script>
    import CliTitleCustomer from "../../../components/base/cliTitleCustomer";
    import ProductList from "../../../components/base/productList";
    import Cookie from "js-cookie";
    import POST from  "../../../api/POST";
    export default {
        components: {ProductList, CliTitleCustomer},
        data () {
            return {
                list:1,
                proList:[]
            }
        },
        created () {
            this.getList()
        },
        methods: {
            getList(){
                let data = {
                    token:Cookie.get('token')
                }
                POST.viewHistory(data).then(res=>{
                    this.proList = res
                })
            }
        }
    }
</script>
<style scope>
    .productList {
        position: absolute;
        right: 0;
        left: 0;
        top: 65px;
        margin: auto;
    }

</style>
